<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String rootId=request.getParameter("rootId");
if(null==rootId)rootId="-1";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'adminSearch.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel='stylesheet' href='css/style.css'>
	<link rel="stylesheet" type="text/css" media="all" href="<%=path%>/js/calendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
    <script type="text/javascript" src="<%=path%>/js/calendar/calendar.js"></script>
	<script type="text/javascript" src="<%=path%>/js/calendar/calendar-setup.js"></script>
	<script type="text/javascript" src="<%=path%>/js/calendar/calendar-zh1.js"></script>
<script language="javascript">
	function IsEmpty()
{
var departmentName=document.inputform.departmentName.value;
if(departmentName==0){
alert("请选择部门");
return;
}
document.inputform.submit();
}
	</script>
  </head>
  
  <body>
    <table class="title" width='200' border='0' cellspacing='0' cellpadding='0'>
			<tr>
				<td width='90'><img src='images/loc-head.jpg' width='90' height='24'></td>
				<td valign='middle' nowrap background='images/loc-bg.jpg' class="title">花名册管理--用户导入</td>
				<td width='12'><img src='images/loc-tail.jpg' width='12' height='24'></td>
			</tr>
		</table><br>
		<s:form action="userbatchAdd.action" name="inputform" enctype="multipart/form-data" cssStyle="iptform" cssClass="myform">
			<table  class="ipttable">
			<tr height="30"><td class="label">选择部门：</td>
			<td align=""><input onclick="openform()" class="input130" name="departmentName" >
			<input type="hidden" name="departmentId" ></td></tr>
			<tr>
			<td class="label">EXCEL文件：</td>
			<td><input type='file' name="userfile" style="width:350px;" class="input130"/></td>
			<td><a style="color:#1b5e8e;text-decoration:none;background-position:right -25px;" href="/smsprj/doc/AddUser.xls">模板下载</a></td>
			
			</tr>
			<tr>
			<td class="label">TXT号码文件：</td>
			<td><input type='file' name="userFileTxt" style="width:350px;" class="input130"/></td>
			<td><a style="color:#1b5e8e;text-decoration:none;background-position:right -25px;" href="/smsprj/doc/Mobile.txt">模板下载</a></td>
			</tr>
			<tr>
			<td></td>
			<td class="label"><input type="button" value="导入" class="submitbtn" onclick="javascript:IsEmpty()">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" class="resetbtn"></td>
			</tr>
			<tr>
			<td colspan="2" class="label"><s:property value="message"/></td>
			</tr>
			</table>
		</s:form>		
  </body>
</html>

<script type="text/javascript">
    	function openform(){
    		var title = "用户组"; 
		var url = '/smsprj/jsp/deptSel.jsp';
		var pageUrl="/smsprj/jsp/deptSel.jsp";
		var paraObj = new Object();
		paraObj.url=url;

		paraObj.title=title;
		paraObj.rootId='-2';
	

		var objId=document.getElementById("departmentId");
		var objName=document.getElementById("departmentName");
		paraObj.input=objId;
		var sFeatures = 'help:no;status:1;dialogHeight:500px;dialogWidth:350px;center:1';
	    var rtnObj= window.showModalDialog(pageUrl,paraObj,sFeatures );
		if(rtnObj){
			var result=rtnObj.result;
			objId.value=result.id;
			objName.value=result.name;
		}else{
    		
    	}
    	//alert('openform');
    	}
    </script>
